# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         in操作符查找指定的key
# Description:
# Author:       asus
# Date:         2019/3/5
#-------------------------------------------------------------------------------


dict = {}#定义一个字典
dict[20] = "Bill"#向字典添加整数类型的key
dict["Mike"] = {'age':30,'salary':3000}#向字典dict添加字符串类型key
dict[(12,"Mike",True)]="hello"#向字典dict添加元组类型的key
print(dict)

IDEs = {
    'eclipse':
        {
            'languages':['Java','Python','JavaScript','PHP'],
            'organization':'Eclipse基金会'
        },
    'visualstudio':
        {
            'languages':['C#','C++','VB.NET'],
            'organization':'微软'
        },
    'webstorm':
        {
            'languages':['JavaScript'],
            'organization':'JetBrains'
        }
}
labels = {                      #定义一个字典，用于储存显示的标签
    'languages':'支持的编程语言',
    'organization':'所属机构'
}
IDE = input("请输入IDE的名字：")
findIDE = IDE.replace(" ","").lower()
choice = input('要查询IDE支持的编程语言(lang)还是所属机构(org)？')
if choice == "lang": key = 'languages'
if choice == "org": key = 'organization'
if findIDE in IDEs:
    print("{}{}是{}.".format(IDE,labels[key],IDEs[findIDE][key]))